<?php // Online Customer Service ?>
<?php
	// Yahoo settings
	$ym_icon_style = "1";
	$ym_icon_width = "64";
	$ym_icon_height = "16";
	
	// Query Add Yahoo User Here
	$sql = "select a.* 
			from tbl_link a
			where 	a.stsrc = 'A'
				and a.linkcategory = 'yahoo'
			order by a.linkposition asc, a.datein asc 
			limit 0,10
			";
			
	$exe = mysql_query($sql) or die(mysql_error());
	$num = mysql_num_rows($exe);
	
	
	$ym = null;
	$ym = array();
	
	while($row = mysql_fetch_array($exe))
	{
		$ym[$row['linklabel']] = $row['linkurlhref'];	// push in array
	}
	
	if(!empty($ym))
	{
?>
<div>
	<h2>Online Marketing</h2>
</div>
<div>
	<p>
		<div style="text-align:center;"><img src="<?php echo getURLdomain(); ?>/source/front/img/contact-us-yahoo.png" /></div>
		<div style="text-align:left; padding:5px; font-size:11px;">We'll be happy to help you make the right choice. For project or custom furniture, please talk to our Online Marketing below.</div>
		<div style="text-align:left; padding:5px;">
			<table border="0" cellpadding="0" cellspacing="0">
			<?php
				foreach($ym as $a => $b)
				{
			?>
			<tr style="padding-bottom:15px;">
				<td style="vertical-align:middle;"><?php echo $a; ?>&nbsp;&nbsp;&nbsp;</td>
				<td><a href="ymsgr:sendim?<?php echo $b; ?>"><img src="http://opi.yahoo.com/online?u=<?php echo $b; ?>&m=g&t=<?php echo $ym_icon_style ?>" width="<?php echo $ym_icon_width ?>" height="<?php echo $ym_icon_height ?>" border="0" /></a><br /></td>
			</tr>
			<tr>
				<td colspan="2" style="height:5px;"></td>
			</tr>
			<?php
				}
			?>
			</table>
		</div>
	</p>
</div>
<?php
	}
?>